#ifndef _MODESTO_CHANNEL_H_
#define _MODESTO_CHANNEL_H_

#include <string>
#include <map>
#include "user.h"

class Channel
{
protected:

	// Unique identifier for the server.
	int server;

	// The name of the channel.
	std::string name;

	// The topic of the channel.
	std::string topic;

	// List of users who are in the channel.
	UserList users;

public:
	
	// Create a new channel.
	Channel(std::string name);
	
	// Get the name of the channel.
	std::string getName();
	
	// Set the topic of the channel.
	void setTopic(std::string topic);
	
	// Get the topic of the channel.
	std::string getTopic();
	
	// Add a user to the channel.
	void addUser(User *user);
	
	// Check to see if the channel has a user.
	bool hasUser(std::string name);
	
	// Get the user from the channel.
	User *getUser(std::string name);
};

typedef std::map<std::string, Channel *> ChannelList;
typedef std::pair<std::string, Channel *> ChannelListItem;
typedef std::map<std::string, Channel *>::iterator ChannelListIter;

#endif